//
//  YXImageEditTool.h
//  MiaoPaiVideoKitSample
//
//  Created by Makarov on 2017/12/13.
//  Copyright © 2017年 Makarov. All rights reserved.
//

#import "YXImageAEApplyer.h"
#import "YXVideoKitType.h"
#import "YXGLContext.h"

@interface YXImageEditTool : NSObject

+ (void)GenIconsWithImage:(UIImage *)inputImage models:(NSArray *)models scale:(CGFloat)scale handler:(void (^)(UIImage *outputImage))handler;
+ (void)cancelGenIcons;

+ (GLuint)maxSupportedImageSize;

@property (nonatomic, strong) YXGLContext *context;
@property (nonatomic, readonly) GLuint width;
@property (nonatomic, readonly) GLuint height;

- (void)usingImage:(UIImage *)image;
- (void)usingToneModel:(YXVideoEffectModel *)ToneModel;

- (void)enableTileShift:(BOOL)enable;
- (void)enableShadowColor:(BOOL)enable;
- (void)enableHighlightColor:(BOOL)enable;

//levels from 0 ~ 1.
- (void)enhanceLevel:(float)level; //image enhance level
- (void)LUTLevel:(float)level;
- (void)shadowColorIndex:(int)index level:(float)level;
- (void)highlightColorIndex:(int)index level:(float)level;

//levels from -1 ~ 1
- (void)LUXLevel:(float)level;
- (void)luminranceLevel:(float)level;
- (void)contrastLevel:(float)level;
- (void)colorTemperatureLevel:(float)level;
- (void)saturationLevel:(float)level;
- (void)highlightLevel:(float)level;
- (void)shadowLevel:(float)level;
- (void)vignetteLevel:(float)level;
- (void)sharpenLevel:(float)level;

- (void)reset;

- (void)apply:(void (^)(GLuint oT, GLuint oW, GLuint oH))handler;

- (void)requestOutputImage:(void (^)(UIImage *outputImage))handler;

@end
